<div class="case-custom-fields">
    <div ng-if="dialog.event.customFields.length === 0">
        <em>No additional information has been specified</em>
    </div>

    <div class="row">
        <div ng-repeat="customField in (dialog.event.customFields | orderBy:'order') track by $index" ng-init="fieldDef = dialog.customFieldsCache.getCache(customField.name);">
            <div class="clearfix" ng-if="$index % (appLayout.alertCustomFieldColumns || 2) == 0"></div>
            <div class="{{'col-xs-' + (12/(appLayout.alertCustomFieldColumns || 2))}}">
                <custom-field-input
                    index="$index"
                    editable="dialog.canEdit"
                    field="fieldDef"
                    on-update="dialog.updateField(fieldName, value)"
                    value="customField.value"></custom-field-input>
            </div>
        </div>
    </div>
</div>
